import {createStore,combineReducers,applyMiddleware}  from 'redux'
// 中间件
import thunk from 'redux-thunk'

import reducerCounter from './reducers/reducerCounter'
import reducerStudent from './reducers/reducerStudent'
import reducerTask from './reducers/reducerTask'

const rootReducer = combineReducers({
    reducerCounter,
    reducerStudent,
    reducerTask
})

// 03 定义store ； combineReducers 合并reducers；applyMiddleware 构建中间件 形成中间件链；
const store = createStore(rootReducer,applyMiddleware(thunk))

export default store

